# -*- coding: utf-8 -*-
"""
Created on Mon Sep 20 11:00:21 2021

@author: 刘长奇-2019300677
"""
import numpy as np
import matplotlib.pyplot as plt
def func(x):
    return (((np.sin(x-2))**2)*(np.e**(-(x**2))))
x_data=np.linspace(0,2,50)
y_data=func(x_data)
plt.plot(x_data,y_data,label='sin2(x−2)e−x2')
plt.title('sin2(x−2)e−x2')
plt.xlim((0,2))
plt.ylim((0,1))

plt.xlabel('x')
plt.ylabel('y')
plt.legend(loc='upper right')
print(x_data,y_data)
plt.show()